Skip to content

Conversation

@SBGoods
Copy link
Contributor

@SBGoods SBGoods commented Nov 11, 2025

Related Issue

Fixes #565

Description

Adds a new queryfilter package and QueryFilter interface for implementing declarative logic for filtering query results before the results are passed as input for a QueryCheck. This could be used to apply a check to a certain subset of results or as a lookup mechanism to check a specific result.

Filters are implemented at the query check level, so a single test step can have multiple independent query checks with their own filtering.

The current implementations of query filters are:

  • FilterByDisplayNameExact()
  • FilterByDisplayNameRegexp()
  • FilterByResourceIdentity()

This PR also introduces a new ExpectResourceDisplayNameExact() query check that takes a filter and display name as input and asserts that the display name matches the input after filtering.

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
No

@SBGoods SBGoods requested a review from a team as a code owner November 11, 2025 20:14
@SBGoods SBGoods changed the title Add queryfilter package and ExpectResourceDisplayName query check Add queryfilter package and ExpectResourceDisplayNameExact query check Nov 11, 2025
@SBGoods SBGoods added this to the v1.14.0 milestone Nov 11, 2025
@SBGoods SBGoods added the enhancement New feature or request label Nov 11, 2025
Copy link
Member

@austinvalle austinvalle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summarizing a chat @SBGoods + I had offline, all of the code looks good to me here, we just want to make sure that the solution here meshes with how AWS was viewing the original problems in #565 + #563. More discussions to happen offline 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: Enhance querychecks for resource display name

2 participants